POV-Ray : Newsgroups : povray.advanced-users : Object Oriented POV code : Re: Object Oriented POV code Server Time
29 Jul 2024 02:20:15 EDT (-0400)
  Re: Object Oriented POV code  
From: Christopher James Huff
Date: 25 Feb 2004 08:25:49
Message: <cjameshuff-625719.08263725022004@news.povray.org>
In article <403c3ec3$1@news.povray.org>,
 "Hughes, B." <omn### [at] charternet> wrote:

> > make it easier for the programmer types to create extensions for POV
> > (lens flares, for example), and make those extensions easier to use.
> 
> I guess it could be, if I followed any of this talk at all.

For example, being able to make a lens flare object that you can 
translate around, put in a CSG, etc.


> Simple can be good, but... What I'm imagining happening is that a simple
> sphere might look like:
> 
> ThisSphere.sphere {<1,2,3>,1}

That wouldn't be any syntax I recognize. It could easily end up looking 
like:
def ThisSphere = sphere {<1,2,3>,1}


> And continued usage (adding a color for example):
> 
> ThisSphere.color {<0.1,0.2,0.3,1,0>}

ThisSphere.pigment.color = <0.1,0.2,0.3,1,0>;


> Where MySphere remains defined but gets additional info attached to it. Or
> all at once:
> 
> ThisSphere.sphere.color {<1,2,3>,1,<0.1,0.2,0.3,1,0>}

def ThisSphere = sphere {<1,2,3>, 1 pigment {<0.1,0.2,0.3,1,0>}}

The dot syntax is just about always used for accessing parts of an 
object, not for creating one. Like vector .x, .y, .z, or color .red, 
.green, etc.


> Then raytraced when only the name stands alone:
> 
> ThisSphere

There's several ways adding the object to the scene could be handled, 
this is one way.


> And so it's difficult to think of doing this for evermore complicated
> things. Am I on the wrong track to believe this way?

Yes. You're assuming you would have to do everything in a much more 
complex fashion, this is not the case. The final result could be very 
similar to the current POV language in general use.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.